package Thread_Demo;public class demo1 {    public static void main(String[] args) {        Thread t = new Thread(()->        {            while(true) {                System.out.println("hello thread 0");                try {                    Thread.sleep(1000);                } catch (InterruptedException e) {                    e.printStackTrace();                }            }        });        t.start();        int cnt = 0 ;        while(cnt++ <= 5)        {            System.out.println("hello main cnt = " + cnt);            try {                t.sleep(1000);            } catch (InterruptedException e) {                e.printStackTrace();            }        }        t.interrupt();        while(true)        {            System.out.println("thread 0 is already interrupt");            try {                Thread.sleep(1000);            } catch (InterruptedException e) {                e.printStackTrace();            }        }    }}